﻿using System.Collections.Generic;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Eneta.Portal.Common.Dto;

namespace Eneta.Portal.Profiles.Controls
{
    public class ProfileEventsControl : UserControl
    {
        protected HtmlGenericControl EventsTitle;
        protected Repeater EventsRepeater;

        public string Title
        {
            get { return EventsTitle.InnerText;  }
            set { EventsTitle.InnerText = value; }
        }

        public IList<EventDto> DataSource
        {
            get { return (IList<EventDto>)EventsRepeater.DataSource; }
            set { EventsRepeater.DataSource = value; }
        }

        public override void DataBind()
        {
            base.DataBind();
            EventsRepeater.DataBind();
        }
    }
}
